package com.ctshk.rpc.custom.mapper;

import com.ctshk.rpc.custom.dto.quotation.QuoteServiceTypeDTO;
import com.ctshk.rpc.custom.entity.CustomizedQuotationTripQuoteServiceItems;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 行程报价服务项目 Mapper 接口
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-16
 */
public interface CustomizedQuotationTripQuoteServiceItemsMapper extends BaseMapper<CustomizedQuotationTripQuoteServiceItems> {

    /**
     * 获取项目服务类目列表
     * @param dateId
     * @return
     */
    @Select("SELECT service_type_name \n" +
            "FROM t_customized_quotation_trip_quote_service_items\n" +
            "WHERE date_id = #{date_id} AND is_deleted = 0 GROUP BY service_type_name")
    List<QuoteServiceTypeDTO> queryServiceTypeList(@Param("date_id") Long dateId);

}
